<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">

<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<title>DOMAssistantLoad module - DOM Assistant, the modular lightweight JavaScript library</title>
	<style type="text/css">
		@import url("css/domassistant.css");
	</style>
	<!--[if lt IE 7]>
		<link rel="stylesheet" href="css/ie.css" type="text/css">
	<![endif]-->
</head>

<body>
	
	<div id="container">
		<div id="inner-container">
			<div id="main-content">
				<h1><a href="index.htm"><span></span>DOMAssistant</a></h1>
				<h2>DOMAssistantLoad module</h2>
				<p>Here you will find a general documentation for the DOMAssistantLoad module.</p>
				<h3 id="domass-module">Module documentation</h3>
				<p>The DOMAssistantLoad module offers a way to call a number of functions as soon as the DOM has loaded, as opposed to waiting for all images and other external files to completely load. It was inspired and influenced by Dean Edwards, Matthias Miller, and John Resig: <a href="http://dean.edwards.name/weblog/2006/06/again/">window.onload (again)</a>.</p>
				
				<h4>Methods</h4>
				<ul>
					<li><a href="#DOMReady">DOMReady</a></li>
				</ul>
				
				<h4 id="DOMReady"><code>DOMReady()</code></h4>
				<p>From any file, just call the DOMReady method with desired functions and they will be executed as soon as the DOM has loaded.</p>
				<h5>Parameters</h5>
				<p>Send in any number of function references, anonymous functions or strings with function names and parentheses.</p>
				
				<h5>Example calls</h5>
<pre><code>
// Calls myFunc when the DOM is loaded
DOMAssistant.DOMReady(myFunc);

// Calls myFunc with one parameter when the DOM is loaded
DOMAssistant.DOMReady("myFunc('Some text')");

// Calls myFunc and anotherFunction when the DOM is loaded
DOMAssistant.DOMReady(myFunc, "anotherFunction()");

// Calls myFunc and an anonymous function when the DOM is loaded
DOMAssistant.DOMReady(myFunc, function(){
	// Perform some magic
});
</code></pre>
			
			</div>
			
			<div id="navigation">
				<div id="navigation-inner">
					<p><em>Current version is 2.0, released September 19th 2007.</em></p>
					<p><em>November 8th 2007 update: <code>elmsByAttribute</code> update. <a href="Release-notes.txt">Release notes</a></em></p>
					<h3>Information</h3>
					<ul>
						<li><a href="index.htm">Introduction</a></li>
						<li><a href="compatibility.htm">Compatibility</a></li>
						<li><a href="demo.htm">Demo</a></li>
					</ul>
				
					<h3>Module documentation</h3>
					<ul>
						<li><a href="modules-domassistant.htm">DOMAssistant</a></li>
						<li><a href="modules-domassistant-ajax.htm">DOMAssistantAJAX</a></li>
						<li><a href="modules-domassistant-content.htm">DOMAssistantContent</a></li>
						<li><a href="modules-domassistant-css.htm">DOMAssistantCSS</a></li>
						<li><a href="modules-domassistant-events.htm">DOMAssistantEvents</a></li>						
						<li><a href="modules-domassistant-load.htm" class="selected">DOMAssistantLoad</a></li>
						<li><a href="documentation/DOMAssistant-documentation.pdf">Complete documentation (PDF)</a></li>
						<li><a href="documentation/DOMAssistant-diagram.pdf">Diagram with all modules and methods (PDF)</a></li>
					</ul>
	
					<h3>Downloads</h3>
					
					<h4>Complete files with all modules</h4>
					<ul>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantCompressed-2.0.js&amp;can=2&amp;q=#makechanges" title="Download DOMAssistantCompressed.js at Google code">Compressed (10.5 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantComplete-2.0.js&amp;can=2&amp;q=#makechanges" title="Download DOMAssistantComplete.js at Google code">Uncompressed (15.7 kb)</a></li>
					</ul>
					
					<h4>Module by module</h4>
					<ul>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistant-2.0-modules.zip&amp;can=2&amp;q=#makechanges" title="Download DOMAssistant-2.0-modules.zip at Google code">All DOMAssistant modules ZIP file (8.8 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistant-2.0.js&amp;can=2&amp;q=" title="Download DOMAssistant.js at Google code">DOMAssistant (4.2 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantAJAX-2.0.js&amp;can=2&amp;q=" title="Download DOMAssistantAJAX.js at Google code">DOMAssistantAJAX (1.4 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantContent-2.0.js&amp;can=2&amp;q=" title="Download DOMAssistantContent.js at Google code">DOMAssistantContent (3.3 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantCSS-2.0.js&amp;can=2&amp;q=" title="Download DOMAssistantCSS.js at Google code">DOMAssistantCSS (2.5 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantEvents-2.0.js&amp;can=2&amp;q=" title="Download DOMAssistantEvents.js at Google code">DOMAssistantEvents (2.2 kb)</a></li>
						<li><a href="http://code.google.com/p/domassistant/downloads/detail?name=DOMAssistantLoad-2.0.js&amp;can=2&amp;q=" title="Download DOMAssistantLoad.js at Google code">DOMAssistantLoad (2.1 kb)</a></li>
					</ul>
								
					<h3>Comments/updates</h3>
					<ul>
						<li><a href="http://www.robertnyman.com/2007/01/25/domass-the-dom-assistant/">First release blog post with comments and information</a></li>
						<li><a href="http://www.robertnyman.com/2007/09/20/releasing-domassistant-20-chainability-ajax-module-domready-xpath-and-more/">Version 2.0 release blog post with comments and information</a></li>
					</ul>
					
					<h3>Sign up for updates</h3>
					<p>Send an e-mail to domassistant [at] robertnyman [dot] com to verify your e-mail address and receive information about updates</p>
				
					<h3>Contact</h3>
					<ul>
						<li><a href="http://www.robertnyman.com/about">Contact the author</a></li>
					</ul>
				</div>	
				
			</div>		
		</div>
		
		<div id="footer">
			Created by Robert Nyman, <a href="http://www.robertnyman.com">http://www.robertnyman.com</a>
		</div>
		
	</div>
	
	<!-- Google Analytics code -->
	<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
	<script type="text/javascript">
		_uacct = "UA-56164-1";
		urchinTracker();
	</script>
	
	<!-- Start of StatCounter Code -->
	<script type="text/javascript">
	<!-- 
	var sc_project=593937; 
	var sc_partition=4; 
	var sc_security="175a1fec"; 
	//-->
	</script>
		
	<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a class="statcounter" href="http://www.statcounter.com/"><img class="statcounter" src="http://c5.statcounter.com/counter.php?sc_project=593937&amp;java=0&amp;security=175a1fec" alt="free geoip" /></a></div></noscript>
	<!-- End of StatCounter Code -->
	
	<!-- gVisit code -->
	<script type="text/javascript" src="http://www.gvisit.com/record.php?sid=de2c9dfeacdc0124bdb3fe3eab766832"></script>
	
</body>
</html>